﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Web.Api.Server.Models
{

    [Table(Name = "images")]
    public class Image
    {
        [Column(Name = "id", IsIdentity = true, IsPrimary = true)]
        public int Id { get; set; }

        [Column(Name = "filename", StringLength = 255)]
        public string Filename { get; set; }

        [Column(Name = "storage_path", StringLength = 255)]
        public string Storage_Path { get; set; }

        [Column(Name = "model_name", StringLength = 255, IsNullable = true)]
        public string ModelName { get; set; }

        [Column(Name = "model_id", IsNullable = true)]
        public int? ModelId { get; set; }

        [Column(Name = "created_at", IsNullable = true)]
        public DateTime? CreatedAt { get; set; } = DateTime.Now;

        [Column(Name = "updated_at", IsNullable = true)]
        public DateTime? UpdatedAt { get; set; } = DateTime.Now;
    }
}
